package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FaqMapper;
import com.ruoyi.system.domain.Faq;
import com.ruoyi.system.service.IFaqService;

/**
 * crudService业务层处理
 * 
 * @author keshao
 * @date 2023-01-30
 */
@Service
public class FaqServiceImpl implements IFaqService 
{
    @Autowired
    private FaqMapper faqMapper;

    /**
     * 查询crud
     * 
     * @param id crud主键
     * @return crud
     */
    @Override
    public Faq selectFaqById(Long id)
    {
        return faqMapper.selectFaqById(id);
    }

    /**
     * 查询crud列表
     * 
     * @param faq crud
     * @return crud
     */
    @Override
    public List<Faq> selectFaqList(Faq faq)
    {
        return faqMapper.selectFaqList(faq);
    }

    /**
     * 新增crud
     * 
     * @param faq crud
     * @return 结果
     */
    @Override
    public int insertFaq(Faq faq)
    {
        return faqMapper.insertFaq(faq);
    }

    /**
     * 修改crud
     * 
     * @param faq crud
     * @return 结果
     */
    @Override
    public int updateFaq(Faq faq)
    {
        return faqMapper.updateFaq(faq);
    }

    /**
     * 批量删除crud
     * 
     * @param ids 需要删除的crud主键
     * @return 结果
     */
    @Override
    public int deleteFaqByIds(Long[] ids)
    {
        return faqMapper.deleteFaqByIds(ids);
    }

    /**
     * 删除crud信息
     * 
     * @param id crud主键
     * @return 结果
     */
    @Override
    public int deleteFaqById(Long id)
    {
        return faqMapper.deleteFaqById(id);
    }
}
